﻿app.factory('roomFactory', function ($http) {
    var factory = {};

    factory.searchRoom = function(dataPost) {
        return $http.post(searchRoomApiAddress, dataPost);
    };
    factory.updateNextLesson = function(id) {
        return $http.post(nextLessonApiAddress+id);
    };
    factory.getRoom = function (id) {
        return $http.get(getRoomApiAddress+ id);
    };
    factory.postRoom = function (data) {
        return $http.post(createRoomApiAddress, data);
    };
    factory.putRoom = function (data) {
        return $http.post(updateRoomApiAddress, data);
    };
    factory.delRoomById = function (id) {
        return $http.post(delRoomApiAddress+ id);
    };
    return factory;
});